package com.example.drawboard.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import com.example.drawboard.R;

public class LineAdapter extends ArrayAdapter<Integer> {
    int resource;
    public LineAdapter(Context context, int resource, Integer[] objects) {
        super(context, resource, objects);
        this.resource = resource;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View view = LayoutInflater.from(getContext()).inflate(resource,parent,false);
        TextView tv_select =view.findViewById(R.id.tv_select);
        tv_select.setText(String.valueOf(getItem(position)));
        return view;
    }
}
